package com.mars.demo01.bean;

import com.mars.demo01.config.MyConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);
        ProxyP proxy = applicationContext.getBean("proxy", ProxyP.class);
        proxy.rentRoom();

    }


}
